<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Example 53 (ALL) - Integrating an AdTech Ad Server - Overriding the Request Template</title>
<script type="text/javascript" src="../dist/jquery-1.3.1.js"></script>
<script type="text/javascript" src="../dist/flowplayer-3.1.4.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/global.css" />
</head>
<body>

<h2>Example 53 (ALL) - Integrating an AdTech Ad Server - Overriding the Request Template</h2>
<p class="example">
This example illustrates pre and post roll ads delivered from an AdTech Ad Server along
with an overlay ad and companions for both ad types. The configuration demonstrates how to
define the AdTech Ad Server VAST request using custom properties and how those properties
may be declared at the "general" or "ad slot" specific levels.
</p>
<div id="container">
  <div id="player_row">
     <div id="player-left-619">
      <a class="player614x345"></a>
      <div id="container-614x280">
        <div id="companion-300x250">
           A COMPANION ADVERTISEMENT<br/>(300x250)<br/>WILL APPEAR IN HERE
          </div>
          <div id="filler-310x254">
             FILLER SPACE
          </div>
       </div>
      </div>
     <div id="player-right-600">
        <div id="companion-160x600">
          A COMPANION ADVERTISEMENT<br/>(160x600)<br/> WILL APPEAR IN HERE
        </div>
     </div>
  </div>
</div>

<script type="text/javascript">
flowplayer("a.player614x345", "../dist/flowplayer-3.1.5.swf", {
    plugins: {
        rtmp: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        rtmpInstream: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        openAdStreamer: {
            url: '../dist/OpenAdStreamer.swf',
//            "url": "/fp-http/OpenAdStreamer.swf",

            "shows": {
                "baseURL": "http://streaming.openvideoads.org/shows",
                "streams": [
                    {
                        "file":"the-black-hole.mp4",
                        "duration":"00:00:20"
                    }
                ]
            },

            "ads": {
              "displayCompanions": true,
              "restoreCompanions": false,
              "companions": [
                   { "id":"companion-160x600", "width":"160", "height":"600" },
                   { "id":"companion-300x250", "width":"300", "height":"250" }
              ],
              "servers": [
                   {
                      "type": "AdTech",
                      "apiAddress": "http://de.at.atwola.com/?adrawdata/3.0/515.1",
                      "requestTemplate": "__api-address__/__zone__/__nondynamic__;alias=__alias____aliaspostfix__;key=__key__;__key-value__;__cookie-name__=__cookie-value__;grp=__group__;misc=__random-number__",
                      "oneAdPerRequest": true,
                      "customProperties": {
                           // override the server custom properties here
                      }
                   }
              ],
              "schedule": [
                   {
                      "zone": "2188758/0/1725", // placement/page-id/size-id
                      "position": "pre-roll"
                   },
                   {
                      "zone": "2188757/0/1728",
                      "startTime": "00:00:03",
                      "duration": "10",
                      "position": "reserved-bottom-center-w450px-h50px-transparent-0m",
                      "server": {
                         "customProperties": {
							"nondynamic": "noperf=1;cc=2;header=yes;cookie=yes;adct=204",
							"alias": "", //"onlineshop",
							"aliaspostfix": "", //"_pre",
							"key": "key1+key2", //"girl+shopping+bra+gender",
							"key-value": "", //"kvgender=women+age=>20",
							"cookie-name": "", //"shoppingmall",
							"cookie-value": "", //"october",
							"group": "[group]" //"23"
                         }
                      }
                   },
                   {
                     "zone": "2188758/0/1725",
                     "position": "post-roll"
                   }
              ]
            },

            "debug": {
              "levels": "fatal",
              "debugger": "firebug"
            }
        }
    }
});
</script>
<br/>
<p class="example">
The resulting stream configuration is as follows:
<ul>
<li>AdTech served pre-roll + companions</li>
<li>AdTech served XML wrapper pointing to an OpenX ad request for an overlay</li>
<li>AdTech served post-roll + companions</li>
</ul>
</p>
<p>
The configuration for this example is:
</p>
<div class="codebox">
<pre>
<code class="javascript">
flowplayer("a.player614x345", "../dist/flowplayer-3.1.5.swf", {
    plugins: {
        rtmp: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        rtmpInstream: {
            url: "../dist/flowplayer.rtmp-3.1.3.swf"
        },
        openAdStreamer: {
            url: '../dist/OpenAdStreamer.swf',

            "shows": {
                "baseURL": "http://streaming.openvideoads.org/shows",
                "streams": [
                    {
                        "file":"the-black-hole.mp4",
                        "duration":"00:00:20"
                    }
                ]
            },

            "ads": {
              "displayCompanions": true,
              "restoreCompanions": false,
              "companions": [
                   { "id":"companion-160x600", "width":"160", "height":"600" },
                   { "id":"companion-300x250", "width":"300", "height":"250" }
              ],
              "servers": [
                   {
                      "type": "AdTech",
                      "apiAddress": "http://de.at.atwola.com/?adrawdata/3.0/515.1",
                      "requestTemplate": "__api-address__/__zone__/__nondynamic__;
                                          alias=__alias____aliaspostfix__;key=__key__;
                                          __key-value__;__cookie-name__=__cookie-value__;
                                          grp=__group__;misc=__random-number__",
                      "oneAdPerRequest": true,
                      "customProperties": {
                            "nondynamic": "noperf=1;cc=2;header=yes;cookie=yes;adct=204",
                            "alias": "", 
                            "aliaspostfix": "", 
                            "key": "key1+key2", 
                            "key-value": "", 
                            "cookie-name": "", 
                            "cookie-value": "", 
                            "group": "[group]" 
                      }
                   }
              ],
              "schedule": [
                   {
                      "zone": "2189418/0/1725", // composed of placement/page-id/size-id
                      "position": "pre-roll"
                   },
                   {
                      "zone": "2188757/0/1728",
                      "startTime": "00:00:03",
                      "duration": "10",
                      "position": "reserved-bottom-center-w450px-h50px-transparent-0m",
                      "server": {
                         "customProperties": {
                              // override the server custom properties here
                         }
                      }
                   },
                   {
                     "zone": "2189418/0/1725",
                     "position": "post-roll"
                   }
              ]
            },

            "debug": {
              "levels": "fatal",
              "debugger": "firebug"
            }
        }
    }
});
</code>
</pre>
</div>
<script type="text/javascript" src="js/tracking.js">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10158120-3");
if(TRACKING_TURNED_ON) {
  pageTracker._trackPageview();
}
} catch(err) {}
</script>
</body>
</html>